if(NOT CMAKE_COMPILER_IS_GNUCXX AND NOT MSVC)
    message(FATAL_ERROR "${PROJECT_NAME} requires g++ or msvc.")
endif()

if(CMAKE_COMPILER_IS_GNUCXX)
    execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GNUCXX_VERSION)
    
    if(GNUCXX_VERSION VERSION_LESS 4.4)
        message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.4 or greater.")
    endif()
endif()